package xyz.erupt.flow.data.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import xyz.erupt.flow.data.interfaces.Create;
import xyz.erupt.flow.data.interfaces.Delete;
import xyz.erupt.flow.data.interfaces.Update;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @description: 工作流定义
 * @className: OaWorkFlowDefinition
 * @author: PP
 * @date: 2024/10/19 9:18
 * @Version: 1.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DTO_OaWorkFlowDefinition {
    @NotNull(groups = {Update.class, Delete.class})
    private Long id;

    @NotNull(groups = {Create.class,Update.class})
    private Long workFlowGroup;

    /**
     * @description: 表单/流程名称
     * @author: PP
     * @date: 2024/10/19 9:45
     * @param:
     * @return:
    **/
    @NotBlank(groups = {Create.class})
    private String formName;

    /**
     * 图标配置
     */
    @NotBlank(groups = {Create.class})
    private String logo;

    /**
     * 设置项
     * //json类型
     */
    @NotBlank(groups = {Create.class})
    private String settings;

    /**
     * 流程设置内容
     * //json类型
     */
    @NotBlank(groups = {Create.class})
    private String process;

    /**
     * 表单内容
     * //json类型
     */
    @NotBlank(groups = {Create.class})
    private String formItems;

    /**
     * 备注
     */
    private String remark;

    /**
     * 数据定义唯一键（多个修改版本中使用同一个流程键）
     */
    @NotBlank(groups = {Update.class})
    private String processKey;
}
